package com.morty.businessLog.controller;

import com.morty.businessLog.sevice.BusinessLogService;
import com.morty.config.model.TableModifyLog;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: djy
 * @Date: 2021/8/24
 * @Description:
 */
@RequestMapping("/es/businessLog")
@RestController
public class BusinessLogController {

    @Resource
    private BusinessLogService businessLogService;

    @PostMapping("/getByConditions")
    @ApiOperation(value = "根据条件不分页查询数据")
    @ApiImplicitParams(
            @ApiImplicitParam(name = "tableModifyLog", value = "查询条件对象" ,paramType = "body", required = true, dataType = "TableModifyLog")
    )
    public List<TableModifyLog> getByConditions (@RequestBody TableModifyLog tableModifyLog) throws Exception {
        List<TableModifyLog> list = businessLogService.getByConditions(tableModifyLog);
        return list;
    }
}
